package com.job.Gai_Yian.Homework0711;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-12 12:13:24
 */
public class TextPremier1 {
    public static void main(String[] args) {
        System.out.println(Premier1.number);//三个小时都没用到过单例对象，而一直在number

        Premier1 premier1=Premier1.getInstance();
        Premier1 premier2=Premier1.getInstance();
        Premier1 premier3=Premier1.getInstance();
        System.out.println(premier1==premier2 && premier1==premier3);

        premier1.setName("老李");
        System.out.println(premier2.getName());
        System.out.println(premier3.getName());
    }
}
